import { url } from '../utils'
const state = {}

const mutations = {}

const actions = {
  resetDB() {
    return new Promise((resolve, reject) => {
      axios
        .get(url('/dev/refresh-db'))
        .then(resolve)
        .catch(reject)
    })
  },
  mock20Assets() {
    return axios.get(url('/dev/mock20Assets'))
  },
  mock20AssetStocks() {
    return axios.get(url('/dev/mock20AssetStocks'))
  },
  mock20AssetBundles(){
    return axios.get(url('/dev/mock20AssetBundles'))
  },
  mock20FilterableBundles(){
    return axios.get(url('/dev/mock20FilterableBundles'))
  },
  mock10Orders(){
    return axios.get(url('/dev/mock10Orders'))
  },
  mock10FeeRules(){
    return axios.get(url('/dev/mock10FeeRules'))
  },
  clearCache() {
    return axios.get(url('/dev/clear-cache'))
  }
}

const getters = {}

export default {
  namespaced: true,
  state,
  mutations,
  actions,
  getters
}
